
import { defineStore, createPinia } from "pinia";
import { AppState } from "@/store/interface";
export const AppStore = defineStore({
	// id: 必须的，在所有 Store 中唯一
	id: "AppStore",
	// state: 返回对象的函数
  state: (): AppState => ({
    sidebar: {
      opened: false,
      withoutAnimation: false,
      hide: false
    },
    device: '',
    size: '', //大小,
    theme: ''
  }),
  getters: {
  },
  actions: {
    async toggleSidebar() {
			this.sidebar.opened = !this.sidebar.opened;
		},
  }
});